package com.ly.mpayment.persist.entity;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;


/**
 * DownRechargeGame entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="downrechargegame"

)

public class DownRechargeGame  implements java.io.Serializable {


    // Fields

     private String downgameuuid;
     private DownShopProduct downShopProduct;
     private ProvincialInformation provincialInformation;
     private User user;
     private String downshopordernum;
     private String downpronum;
     private long rechargeamount;
     private Integer rechargenum;
     private long totalamount;
     private String gameaccount;
     private String downnotificationaddress;
     private String downaccounttype;
     private Integer downchargetype;
     private String rechargearea;
     private String rechargeserver;
     private String downgamename;
     private String downuserip;
     private String downstatusgame;
     private Date createtime;
     private long successamount;
     private Set<DownOrderRefund> downOrderRefunds = new HashSet<DownOrderRefund>(0);
     private Set<DownOrderLog> downOrderLogs = new HashSet<DownOrderLog>(0);


    // Constructors

    /** default constructor */
    public DownRechargeGame() {
    }


    /** full constructor */
    public DownRechargeGame(DownShopProduct downShopProduct, ProvincialInformation provincialInformation, User user, String downshopordernum, String downpronum, long rechargeamount, Integer rechargenum, long totalamount, String gameaccount, String downnotificationaddress, String downaccounttype, Integer downchargetype, String rechargearea, String rechargeserver, String downgamename, String downuserip, String downstatusgame, Date createtime, long successamount, Set<DownOrderRefund> downOrderRefunds, Set<DownOrderLog> downOrderLogs) {
        this.downShopProduct = downShopProduct;
        this.provincialInformation = provincialInformation;
        this.user = user;
        this.downshopordernum = downshopordernum;
        this.downpronum = downpronum;
        this.rechargeamount = rechargeamount;
        this.rechargenum = rechargenum;
        this.totalamount = totalamount;
        this.gameaccount = gameaccount;
        this.downnotificationaddress = downnotificationaddress;
        this.downaccounttype = downaccounttype;
        this.downchargetype = downchargetype;
        this.rechargearea = rechargearea;
        this.rechargeserver = rechargeserver;
        this.downgamename = downgamename;
        this.downuserip = downuserip;
        this.downstatusgame = downstatusgame;
        this.createtime = createtime;
        this.successamount = successamount;
        this.downOrderRefunds = downOrderRefunds;
        this.downOrderLogs = downOrderLogs;
    }


    // Property accessors
    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name="downgameuuid", unique=true, nullable=false, length=40)

    public String getDowngameuuid() {
        return this.downgameuuid;
    }

    public void setDowngameuuid(String downgameuuid) {
        this.downgameuuid = downgameuuid;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="downprouuid")

    public DownShopProduct getDownShopProduct() {
        return this.downShopProduct;
    }

    public void setDownShopProduct(DownShopProduct downShopProduct) {
        this.downShopProduct = downShopProduct;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="provinceuuid")

    public ProvincialInformation getProvincialInformation() {
        return this.provincialInformation;
    }

    public void setProvincialInformation(ProvincialInformation provincialInformation) {
        this.provincialInformation = provincialInformation;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="useruuid")

    public User getUser() {
        return this.user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Column(name="downshopordernum", length=40)

    public String getDownshopordernum() {
        return this.downshopordernum;
    }

    public void setDownshopordernum(String downshopordernum) {
        this.downshopordernum = downshopordernum;
    }

    @Column(name="downpronum", length=20)

    public String getDownpronum() {
        return this.downpronum;
    }

    public void setDownpronum(String downpronum) {
        this.downpronum = downpronum;
    }

    @Column(name="rechargeamount", precision=28, scale=5)

    public long getRechargeamount() {
        return this.rechargeamount;
    }

    public void setRechargeamount(long rechargeamount) {
        this.rechargeamount = rechargeamount;
    }

    @Column(name="rechargenum")

    public Integer getRechargenum() {
        return this.rechargenum;
    }

    public void setRechargenum(Integer rechargenum) {
        this.rechargenum = rechargenum;
    }

    @Column(name="totalamount", precision=28, scale=5)

    public long getTotalamount() {
        return this.totalamount;
    }

    public void setTotalamount(long totalamount) {
        this.totalamount = totalamount;
    }

    @Column(name="gameaccount", length=20)

    public String getGameaccount() {
        return this.gameaccount;
    }

    public void setGameaccount(String gameaccount) {
        this.gameaccount = gameaccount;
    }

    @Column(name="downnotificationaddress", length=200)

    public String getDownnotificationaddress() {
        return this.downnotificationaddress;
    }

    public void setDownnotificationaddress(String downnotificationaddress) {
        this.downnotificationaddress = downnotificationaddress;
    }

    @Column(name="downaccounttype", length=40)

    public String getDownaccounttype() {
        return this.downaccounttype;
    }

    public void setDownaccounttype(String downaccounttype) {
        this.downaccounttype = downaccounttype;
    }

    @Column(name="downchargetype")

    public Integer getDownchargetype() {
        return this.downchargetype;
    }

    public void setDownchargetype(Integer downchargetype) {
        this.downchargetype = downchargetype;
    }

    @Column(name="rechargearea", length=20)

    public String getRechargearea() {
        return this.rechargearea;
    }

    public void setRechargearea(String rechargearea) {
        this.rechargearea = rechargearea;
    }

    @Column(name="rechargeserver", length=40)

    public String getRechargeserver() {
        return this.rechargeserver;
    }

    public void setRechargeserver(String rechargeserver) {
        this.rechargeserver = rechargeserver;
    }

    @Column(name="downgamename", length=40)

    public String getDowngamename() {
        return this.downgamename;
    }

    public void setDowngamename(String downgamename) {
        this.downgamename = downgamename;
    }

    @Column(name="downuserip", length=40)

    public String getDownuserip() {
        return this.downuserip;
    }

    public void setDownuserip(String downuserip) {
        this.downuserip = downuserip;
    }

    @Column(name="downstatusgame", length=40)

    public String getDownstatusgame() {
        return this.downstatusgame;
    }

    public void setDownstatusgame(String downstatusgame) {
        this.downstatusgame = downstatusgame;
    }

    @Column(name="createtime", length=19)

    public Date getCreatetime() {
        return this.createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @Column(name="successamount", precision=28, scale=5)

    public long getSuccessamount() {
        return this.successamount;
    }

    public void setSuccessamount(long successamount) {
        this.successamount = successamount;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="downRechargeGame")

    public Set<DownOrderRefund> getDownOrderRefunds() {
        return this.downOrderRefunds;
    }

    public void setDownOrderRefunds(Set<DownOrderRefund> downOrderRefunds) {
        this.downOrderRefunds = downOrderRefunds;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="downRechargeGame")

    public Set<DownOrderLog> getDownOrderLogs() {
        return this.downOrderLogs;
    }

    public void setDownOrderLogs(Set<DownOrderLog> downOrderLogs) {
        this.downOrderLogs = downOrderLogs;
    }









}
